<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Selenium IDE Test</title>
    <link rel="stylesheet" type="text/css" href="chrome://selenium-ide/content/jsunit/css/jsUnitStyle.css">
		<script type="text/javascript" src="chrome://selenium-ide/content/jsunit/app/jsUnitCore.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/selenium-core/scripts/selenium-browserdetect.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/selenium-core/lib/prototype.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/preferences.js"></script>
		<script type="text/javascript">
function setUp() {
    this.Preferences = SeleniumIDE.Preferences;
}

function testArray() {
    Preferences.setString("test.array.length", 1);
    Preferences.setString("test.array.0", "foo");
    
    var array = Preferences.getArray("test.array");
    assertEquals(1, array.length);
    assertEquals("foo", array[0]);

    array.push("bar");
    Preferences.setArray("test.array", array);
    array = Preferences.getArray("test.array");
    assertEquals(2, array.length);
    assertEquals("foo", array[0]);
    assertEquals("bar", array[1]);
}
</script>
  </head>

  <body>
  </body>
</html>
